﻿using System;

namespace 父龄子龄
{
    class Program
    {
        static void Main(string[] args)
        {
            int fa, ma, bo, se;
            for (fa = 0; fa < 78; fa++)
            {

                for (ma = 0; ma < 78; ma++)
                {

                    for (bo = 0; bo < 17; bo++)
                    {
                        for (se = 0; se < 17; se++)
                        {
                            if ((fa + ma == 78) && (bo + se == 17) && (fa + 4 == 4 * (se + 4)) && (ma + 4 == 3 * (bo + 4)))
                            {
                                int year = (fa - 3 * bo) / 2;
                                Console.WriteLine("\n 答：是公元{0}年", 1998 + year);
                                Console.ReadKey();
                            }
                        }

                    }
                }
            }
        }
    }
}
